package com.cjj.particle;

import android.app.Activity;
import android.view.Gravity;
import android.view.View;
import android.view.animation.AccelerateInterpolator;

import com.plattysoft.leonids.ParticleSystem;

/**
 * Created by Administrator on 2015/7/6.
 */
public class JJSnow extends ParticleSystem {

    public JJSnow(Activity a,  int drawableRedId) {
        super(a, 100, drawableRedId, 3000);
    }


    public JJSnow(Activity a, int maxParticles, int drawableRedId, long timeToLive) {
        super(a, maxParticles, drawableRedId, timeToLive);
    }

    public void getSnow(View v) {
        setScaleRange(0.7f, 1.3f);
        setSpeedModuleAndAngleRange(0.07f, 0.16f, 0, 180);
        setRotationSpeedRange(90, 180);
        setAcceleration(0.00013f, 90);
        setFadeOut(200, new AccelerateInterpolator());
        emit(v, 100);
    }
}
